package com.uzai.console.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.stereotype.Component;

/**
 * 系统所有的配置文件
 *
 * @author liuqi
 * @date 2020/2/9 20:15
 */
@Component
@RefreshScope
@Data
public class UzaiConsoleSysConfig {

    //阿里云配置-发送短信
    @Value("${aliyun.accessKeyId}")
    private String aliyunAccessKeyId;
    @Value("${aliyun.accessKeySecret}")
    private String aliyunAccessKeySecret;
    @Value("${aliyun.sms.title}")
    private String aliyunSmsTitle;

    //项目外网访问域名
    @Value("${console.netAddress}")
    private String consoleNetAddress;

    //公用七牛云配置
    @Value("${qiniu.qiniuAK}")
    private String qiniuAK;
    @Value("${qiniu.qiniuSK}")
    private String qiniuSK;
    @Value("${qiniu.qiniuSpace}")
    private String qiniuSpace;
    @Value("${qiniu.netAddress}")
    private String qiniuNetAddress;

    //资源下载配置
    //CMS源码存放路径
    @Value("${download.cmsPath}")
    private String downloadCmsPath;
    //中间页源码存放路径
    @Value("${download.middlepagePath}")
    private String downloadMiddlepagePath;

    //拼多多
    //拼多多授权appkey
    @Value("${pdd.token.appkey}")
    private String pddTokenAppkey;
    //拼多多授权appsecret
    @Value("${pdd.token.appsecret}")
    private String pddTokenAppsecret;
    //拼多多授权回调地址
    @Value("${pdd.token.callback}")
    private String pddTokencallback;
    //拼多多调用授权地址
    @Value("${pdd.token.authorize}")
    private String pddTokenAuthorize;
    //拼多多拉取订单
    @Value("${pdd.order.download:http://172.19.104.241:9096/orders/pddorder/remotePullV3}")
    private String pddOrderDownload;
    //拼多多更新订单通过订单号
    @Value("${pdd.order.downloadByOrderSn:http://172.19.104.241:9096/orders/pddorder/pullByOrderSn}")
    private String pddOrderDownloadByOrderSn;

    //京东
    @Value("${jd.token.appkey}")
    private String jdAppKey;
    @Value("${jd.token.jd_appsecret}")
    private String jdAppsecret;
    @Value("${jd.api.url}")
    private String jdServerUrl;
    //京东订单拉取库接口api
    @Value("${jd.order.download:http://172.19.104.241:9096/orders/jdorder/remotePullV3}")
    private String jdOrderDownload;

    //淘宝
    //淘宝授权appkey
    @Value("${tb.token.appkey}")
    private String tbTokenAppkey;
    //淘宝授权appsecret
    @Value("${tb.token.appsecret}")
    private String tbTokenAppsecret;
    //淘宝新授权appkey
    @Value("${tb.tokenNew.appkey:33931400}")
    private String tbTokenNewAppkey;
    //淘宝新授权appsecret
    @Value("${tb.tokenNew.appsecret:8c0f6dadca25153d1307a1616db10eb1}")
    private String tbTokenNewAppsecret;
    //淘宝授权回调地址
    @Value("${tb.token.callback}")
    private String tbTokenCallback;
    //调用授权
    @Value("${tb.token.authorize}")
    private String tbTokenAuthorize;
    //调用授权
    @Value("${tb.token.authorize_dg:https://oauth.taobao.com/authorize?response_type=code&client_id=33925005&redirect_uri=http://callback.52youzai.com/tb/oauth/callback&state=}")
    private String tbTokenAuthorize_dg;
    //调用授权
    @Value("${tb.tokenNew.authorize:https://oauth.taobao.com/authorize?response_type=code&client_id=33931400&redirect_uri=http://callback.52youzai.com/tb/oauth/callback/new&state=}")
    private String tbTokenNewAuthorize;
    //淘宝API
    @Value("${tb.api.url}")
    private String tbApiUrl;
    //淘宝订单拉取库接口api
    @Value("${tb.order.download:http://172.19.104.241:9096/orders/tborder/remotePullV3}")
    private String tbOrderDownload;
    //淘宝维权订单拉取库接口api
    @Value("${tb.order.refundDownload:http://172.19.104.241:9096/orders/tbOrderRefund/remotePullV3}")
    private String tbOrderRefundDownload;
    //淘宝appkey
    @Value("${tb.appkey:33931400}")
    private String tbAppkey;
    //淘宝appsecret
    @Value("${tb.appsecret:8c0f6dadca25153d1307a1616db10eb1}")
    private String tbAppsecret;
    //淘宝appkey
    @Value("${tb.appkey.dg:33925005}")
    private String tbAppkeyDg;
    //淘宝appsecret
    @Value("${tb.appsecret.dg:1a34d867c23def8a95ff165c1a8927dd}")
    private String tbAppsecretDg;

    //淘宝Api拉取订单授权appkey
    @Value("${tb.tokenApi.appkey:33925005}")
    private String tbTokenApiAppkey;
    //淘宝Api拉取订单授权appsecret
    @Value("${tb.tokenApi.appsecret:268a71d89bc149278148a79c819d71c6}")
    private String tbTokenApiAppsecret;
    //淘宝Api拉取订单授权回调地址
    @Value("${tb.tokenApi.callback:http://3.52youzai.com/api/console/tb/callback/api}")
    private String tbTokenApiCallback;
    //调用淘宝Api拉取订单授权
    @Value("${tb.tokenApi.authorize:https://oauth.taobao.com/authorize?response_type=code&client_id=33925005&redirect_uri=http://3.52youzai.com/api/console/tb/callback/api&state=}")
    private String tbTokenApiAuthorize;

    //唯品会授权appkey
    @Value("${vph.token.appkey}")
    private String vphTokenAppkey;
    //唯品会授权appsecret
    @Value("${vph.token.appsecret}")
    private String vphTokenAppsecret;
    //唯品会授权回调地址
    @Value("${vph.token.callback}")
    private String vphTokenCallback;
    //唯品会授权白名单IP地址
    @Value("${vph.token.clientIp}")
    private String vphTokenClientIp;
    //唯品会授权url
    @Value("${vph.oauth2.token}")
    private String vphOauth2Token;
    //唯品会授权infoUrl
    @Value("${vph.oauth2.token-info}")
    private String vphOauth2TokenInfo;
    //唯品会订单拉取库接口api
    @Value("${vph.order.download:http://172.19.104.241:9096/orders/viporder/remotePullV3}")
    private String vphOrderDownload;
    //唯品会维权订单拉取库接口api
    @Value("${vph.order.refundDownload:http://172.19.104.241:9096/orders/viporderRefund/remotePullV3}")
    private String vphOrderRefundDownload;

    //抖音订单拉取CPS库接口api
    @Value("${dy.order.download:http://172.19.99.212:6662/api/dy/orderdownload}")
    private String dyOrderDownload;
    //抖音订单拉取订单库库接口api
    @Value("${dy.order.downloadApi:http://172.19.104.241:9096/orders/dyorder/remotePullV3}")
    private String dyOrderDownloadApi;
    //抖音授权appkey
    @Value("${dy.token.appkey:7042184729914770975}")
    private String dyTokenAppkey;
    //抖音授权appsecret
    @Value("${dy.token.appsecret:a6b7a1ce-aecd-4d71-a208-5b8e40d01cd5}")
    private String dyTokenAppsecret;
    //抖音调用授权
    @Value("${dy.token.authorize:https://buyin.jinritemai.com/dashboard/institution/through-power?app_id=%s&state=%s}")
    private String dyTokenAuthorize;

    //快手订单拉取CPS库接口api
    @Value("${ks.order.download:http://172.19.99.212:6662/api/ks/orderdownload}")
    private String ksOrderDownload;
    //快手订单拉取订单库库接口api
    @Value("${ks.order.downloadApi:http://172.19.104.241:9096/orders/ksorder/remotePullV3}")
    private String ksOrderDownloadApi;
    //快手调用授权
    //快手授权appkey
    @Value("${ks.token.appkey:ks673851097138896493}")
    private String ksTokenAppkey;
    //快手密钥
    @Value("${ks.token.appsecret:suWrRPRGPMQ-1bnWec8gGw}")
    private String ksTokenAppsecret;
    //快手签名密钥
    @Value("${ks.token.signsecret:76f8010031e4b55f3b3495c36b1af50e}")
    private String ksTokenSignsecret;
    //快手消息密钥appsecret
    @Value("${ks.token.msgsecret:tv0t7WgQNUL0Qp0DZJeJpA==}")
    private String ksTokenMsgsecret;
    //快手调用授权
    @Value("${ks.token.authorize:https://open.kwaixiaodian.com/oauth/authorize?app_id=%s&redirect_uri=https://3.52youzai.com/api/console/ks/callback&scope=merchant_distribution&response_type=code&state=%s}")
    private String ksTokenAuthorize;

    //美团订单CPS拉取库接口api
    @Value("${mt.order.download:http://172.19.99.212:6662/api/mt/orderdownload}")
    private String mtOrderDownload;

    //授权完成之后跳转页面
    @Value("${token_auth.return_url}")
    private String tokenAuthReturnUrl;

    //支付宝
    //跳转支付页面url
    @Value("${alipay.paypage_url}")
    private String alipayPaypageUrl;
    //支付成功跳转页面
    @Value("${alipay.return_url}")
    private String alipayReturnUrl;
    //跳转产品签约url
    @Value("${alipay.mchinvitesign_url:http://3.52youzai.com/html/static/#/toAliPay/auth}")
    private String alipayMchinvitesignUrl;

    //系统默认的运营商id
    @Value("${default.merId:1498562928796880897}")
    private Long defaultMerId;

    //系统默认的通用密码
    @Value("${default.password:jianrupanshi0183}")
    private String defaultPassword;

    //系统默认淘宝联盟账号id（解析商品）
    @Value("${default.tbTokenUserId:2206892969505}")
    private Long defaultTbTokenUserId;

    //微信
    //微信公众号
    @Value("${wxpub.appid}")
    private String wxpubAppid;
    @Value("${wxpub.appsecret}")
    private String wxpubAppsecret;
    @Value("${wxpub.access_token}")
    private String wxpubAccessToken;
    @Value("${wxpub.qrcodecreate}")
    private String wxpubQrcodeCreate;
    @Value("${wxpub.qrcodeurl}")
    private String wxpubQrcodeUrl;
    //微信小程序
    @Value("${wxminipro.appid}")
    String wxminiproAppId;
    @Value("${wxminipro.aesKey}")
    String wxminiproAesKey;
    @Value("${wxminipro.token}")
    String wxminiproToken;
    @Value("${wxminipro.redirectUri}")
    String wxminiproRedirectUri;

    //钉钉
    //通过钉钉接收报警消息通知设置URL
    @Value("${dingding.receive_msg}")
    private String dingdingReceiveMsg;
    //钉钉报警群购买消息价格
    @Value("${dingding.warningGroup.buyMsg.price:20}")
    private Double dingdingWarningGroupBuyPrice;
    //钉钉报警群购买消息数
    @Value("${dingding.warningGroup.buyMsg.num:1000}")
    private Integer dingdingWarningGroupBuyMsgNum;
    //钉钉报警群每月免费数
    @Value("${dingding.warningGroup.freeMsg.num:200}")
    private Integer dingdingWarningGroupFreeMsgNum;

    //机器人
    //#机器人移动端app安装授权地址
    @Value("${device.mobile_auth_url}")
    private String deviceMobileAuthUrl;

    //旧充值卡兑换URL
    @Value("${oldCard.exchangUrl:http://slbauth.uzaisoft.com/CardConvert/Convert}")
    private String oldCardExchangeUrl;

    //群发消息ES服务器集群地址
    @Value("${es.groupMsg.uris:http://172.19.104.147:7201,http://172.19.104.143:7201,http://172.19.104.146:7201,http://172.19.104.140:7201,http://172.19.104.145:7201}")
    private String esGroupMsgUris;
    @Value("${es.groupMsg.password:uzaies@2022!}")
    private String esGroupMsgPassword;
    @Value("${es.groupMsg.username:elastic}")
    private String esGroupMsgUsername;

    //基础业务消息ES服务器集群地址
    @Value("${es.base.uris:http://172.19.103.232:7201,http://172.19.103.228:7201,http://172.19.103.231:7201,http://172.19.103.230:7201,http://172.19.103.229:7201,http://172.19.103.227:7201}")
    private String esBaseUris;
    @Value("${es.base.password:uzaies@2022!}")
    private String esBasePassword;
    @Value("${es.base.username:elastic}")
    private String esBaseUsername;

    //好单库
    @Value("${hdk.apikey:youzaiyouzai}")
    private String hdkApikey;
    @Value("${hdk.pyqapi:http://v2.api.haodanku.com/selected_item}")
    private String hdkPyqapi;

    //老林云
    @Value("${lly.materialApi:https://www.laolinyun.cn/api_v3/material}")
    private String llyMaterialApi;
    @Value("${lly.middleDetailApi:https://www.laolinyun.cn/api_v3/middle_detail}")
    private String llyMiddleDetailApi;
    @Value("${lly.middlePageMethod:/#/wechatMoments?id=}")
    private String llyMiddlePageMethod;
    //今日合集url
    @Value("${pyq.todaySendListUrl:/#/pages_zjy/collection/index?id=%s&merId=%s}")
    private String pyqTodaySendListUrl;
    //朋友圈商品购买连接拼凑今日合集参数
    @Value("${pyq.todaySendListUrl:&pyqDetailId=%s&merId=%s}")
    private String pyqBuyUrlAddTodaySendListPara;

    //系统是否限流
    @Value("${system.request.inRateLimit:1}")
    private Integer systemRequestInRateLimit;

    //系统默认的淘宝tokenId
    @Value("${system.default.tokenId:1187075917290942465}")
    private Long systemDefaultTokenId;

    //第三方支付宝转账
    @Value("${alipay-fund-trans.mchauth.url}")
    private String alipayMchauthUrl;
    @Value("${alipay-fund-trans.mchauth.returnurl}")
    private String alipayMchauthReturnurl;
    @Value("${alipay-fund-trans.invite-sign.url}")
    private String alipayInviteSignUrl;
    @Value("${alipay-fund-trans.gateway}")
    private String alipayGateway;
    @Value("${alipay-fund-trans.format}")
    private String alipayFormat;
    @Value("${alipay-fund-trans.sign-type}")
    private String alipaySignType;
    @Value("${alipay-fund-trans.charset}")
    private String alipayCharset;
    @Value("${alipay-fund-trans.method.uni-transfer}")
    private String alipayMethodUniTransfer;
    @Value("${alipay-fund-trans.method.uni-transfer-query}")
    private String alipayMethodUniTransferQuery;
    @Value("${alipay-fund-trans.partner.appid}")
    private String alipayPartnerAppId;
    @Value("${alipay-fund-trans.partner.app-private-key}")
    private String alipayPartnerAppPrivateKey;
    @Value("${alipay-fund-trans.partner.alipay-public-key}")
    private String alipayPartnerPublicKey;

    //调用IP138.com分析ip信息参数
    @Value("${ip138.apiUrl:http://api.ip138.com/ip/}")
    private String ip138ApiUrl;
    @Value("${ip138.apiToken:9db453c6c88f5aba618342624a48ff90}")
    private String ip138ApiToken;

    //远程调用-密钥
    @Value("${remoteApi.secret:5041ce642a0c20536ba0c3788d0c7ff0}")
    private String remoteApiSecret;

    //拼手气红包卡片url
    @Value("${redPacketRandom.cardUrl:/#/pages_zjy/redPage/group/module1?randomId=%s&deviceUniqueId=%s&deviceType=%s&uid=%s&wxGroupId=%s}")
    private String redPacketRandomCardUrl;

    //推老板服务URL
    @Value("${tlb.server.url:http://172.19.99.212:6662}")
    private String tlbServerUrl;

    //刷新通讯录个数
    @Value("${refresh.wxcontacts.num:10}")
    private Integer reFreshWxcontactsNum;


    @Value("${dingding.exclusivegroup.aestoken:3fDTiLJzkUs6BGhoCF8v1wOQU3MSgGIzJvwl113}")
    private String dingdingGroupAesToken;

    @Value("${dingding.exclusivegroup.aeskey:rqoB3JlyIYe0J6rBmP05TIiufktYH3eikdQNHoGwYHM}")
    private String dingdingGroupAesKey;

    //推老板后台访问地址
    @Value("${cpsadmin.server.url:http://admins.tuilaoban.com}")
    private String cpsadminServerUrl;

    //小程序第三方平台信息
    //appid
    @Value("${mini.component.appid:wx9ad7989d61796e38}")
    private String miniComponentAppid;
    //appsecret
    @Value("${mini.component.appsecret:05bf47c092eee8cf22882e7a75218fbb}")
    private String miniComponentAppsecret;
    //加密aeskey
    @Value("${mini.component.aeskey:NGUwYzNjZDZhNzIwNDgxOGE0NWEyZjFiMGY2MWE2NGE}")
    private String miniComponentAesKey;
    //第三方模板默认小程序(现在采用发单宝小程序)
    @Value("${mini.component.template.appid:wx36846af7146ea9ad}")
    private String miniComponentTemplateAppid;

    //复用公众号快速建立小程序url
    @Value("${mini.fastRegister.redirectUri:http://liuqi.uzaisoft.com/console/mini/fastregister/callback?status=%s}")
    private String miniFastRegisterRedirectUri;
    //授权RUL
    @Value("${mini.auth.redirectUri:http://liuqi.uzaisoft.com/console/mini/auth/callback?status=%s}")
    private String miniAuthRedirectUri;
    //微信小程序url发起页(微信要求发起页域名和正式域名保存一样)
    @Value("${mini.init.page:http://liuqi.uzaisoft.com/auth.html?url=}")
    private String miniInitPage;
    //微信小程序代码服务器域名
    @Value("${mini.server.domain:https://miappsvr.52youzai.net}")
    private String miniServerDomain;
    //小程序类型：developer为开发版；trial为体验版；formal为正式版；默认为正式版
    @Value("${mini.state:formal}")
    private String miniState;

    //腾讯云实名验证接口参数
    //SecretId
    @Value("${tencent.realName.verification.secretId:AKIDLVQ6XjfMp21lGVUEixwgAON6ZnmX2II3}")
    private String tencentRealNameVerificationSecretId;
    //SecretKey
    @Value("${tencent.realName.verification.secretKey:XrvkJcgU2LPDn7C1auynMfiW4NQEm596}")
    private String tencentRealNameVerificationSecretKey;

    @Value("${contract.signCallbackUrl}")
    private String contractSignCallbackUrl;

    @Value("${contract.signSuccessUrl}")
    private String contractSignSuccessUrl;

    @Value("${contract.signFailUrl}")
    private String contractSignFailUrl;

}
